import {lazy} from 'react'
export let mainRouter=[
    {
        path:'/home/shou',
        element:lazy(() => import('../views/Home/Shou')),
        title:'首页'
    },
    {
        path:'/home/shou',
        element:lazy(() => import('../views/Home/Shou')),
        title:'分类'
    },
    {
        path:'/home/shou',
        element:lazy(() => import('../views/Home/Shou')),
        title:'吃什么'
    },
    {
        path:'/home/shou',
        element:lazy(() => import('../views/Home/Shou')),
        title:'购物车'
    },
    {
        path:'/home/shou',
        element:lazy(() => import('../views/Home/Shou')),
        title:'我的                        '
    }
]

const routes =[
    {
        path:'*',
        element:lazy(()=> import('../views/Error404'))
    },
    {
        path:'/home',
        element:lazy(()=> import('../views/Home')),
        children:mainRouter
    },
    {
        path:'/detail/:id',
        element:lazy(()=> import('../views/Detail'))
    },
    {
        from:"/",
        to:"/home/shou"
    }
]

export default routes;